<?php get_header(); ?>
<?php if(is_front_page()):?>
<div id="home">
    <div class="large span-17 last">
    	<p class="intro alignCenter">Bienvenue sur mon moleskine virtuel, mon bazar, ma source d'inspiration...</p>
    </div>
    <div class="span-8">
        <h1>Activité du blog</h1>
        <hr />
        <?php 
        $wq = new WP_Query("showposts=2");
        while($wq->have_posts())
        {
            $post = $wq->next_post();
            $title = $post->post_title;
            $excerpt = exc($post->post_content);
        ?>
            <h2><a href="<?php the_permalink();?>" title="<?php echo $title; ?>"><?php echo $title; ?></a>&nbsp;<a href="<?php comments_link(); ?>" class="commentsLink">(<?php echo get_comments_number() == '-1' ? '0' : get_comments_number(); ?>)</a></h2>
            <span class="postInfo quiet small">Ajouté le <?php echo format_date($post->post_date); ?>, sous <?php the_category(',');?></span>
            <p><?php echo $excerpt; ?></p>
        <?php
        };
        ?>
        
        <h2>Plus de news</h2>
        <hr />
        <p>Par catégorie: <?php $c = str_replace('<br />','&nbsp;-&nbsp;', wp_list_categories('style=none&echo=0')); echo substr($c, 0, strlen($c) - 14); ?> </p>
    </div>
    <div class="prepend-1 span-8 last" id="lifestream">
        <h1>Lifestream</h1>
        <hr />
        <ul><?php include('friendfeed/poxd_ff.php'); ?></ul>
        <div class="postInfo quiet small alignRight">Généré depuis <a href="http://friendfeed.com/pollux" title="Vers mon friendfeed">Friendfeed</a></div>
    </div>
</div>
<?php elseif(is_page('a-propos')):
    load_template(TEMPLATEPATH . '/a-propos.php');
else:?>
<div id="blog">
    <div class="span-17 last">
    <?php if(!is_page()): ?>
        <h1><?php the_title(); ?></h1>
        <hr>   
        <div id="postcontent">
            <?php the_post(); the_content(); ?>
        </div>
        <div>
        </div>
   <?php else: ?>
   		<?php the_post(); the_content(); ?>
   <?php endif; ?>
    </div>
</div>
<?php endif; ?>

<?php get_footer(); ?>